package com.sanjiahantang.youjiarole.module.city.views;

import android.Manifest;
import android.content.Context;
import android.widget.BaseAdapter;

import com.amap.api.location.AMapLocationClient;
import com.sanjiahantang.youjiarole.base.BaseView;
import com.sanjiahantang.youjiarole.module.city.beans.CityBean;

import java.util.List;

/**
 * Created by zy on 2017/9/19.
 */

public interface CityView extends BaseView {

    int LOCATING    = 111;
    int FAILED      = 666;
    int SUCCESS     = 888;

    String[] NEEDED_PERMISSIONS = new String[]{
            Manifest.permission.ACCESS_FINE_LOCATION,
            Manifest.permission.ACCESS_COARSE_LOCATION,
            Manifest.permission.WRITE_EXTERNAL_STORAGE,
            Manifest.permission.READ_EXTERNAL_STORAGE
    };

    AMapLocationClient getAMapLocationClient();

    interface OnCityClickListener{
        void onCityClick(CityBean.City city);
        void onLocateClick(Context context);
    }

    interface OnLoadListener{
        void initCityList(BaseAdapter adapter);

        void citySelected(CityBean.City city);
    }

    interface CheckPermissionsListener {
        void onGranted();
        void onDenied(List<String> permissions, Context context);
    }
}
